package nk.map;

//拓扑排序

import java.util.*;

public class AB13 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[] indgree = new int[n + 1];
        HashMap<Integer, List<Integer>> map = new HashMap<>();
        for (int i = 0; i < m; i++) {
            int u = scanner.nextInt();
            int v = scanner.nextInt();
            indgree[v]++;
            List<Integer> children = map.getOrDefault(u, new ArrayList<>());
            children.add(v);
            map.put(u, children);
        }
        LinkedList<Integer> queue = new LinkedList<>();
        for (int i = 1; i <= n ; i++) {
            if (indgree[i] == 0)
                queue.offer(i);
        }
        ArrayList<Integer> ans = new ArrayList<>();
        while (!queue.isEmpty()) {
            int u = queue.poll();
            ans.add(u);
            if (!map.containsKey(u))
                continue;
            List<Integer> children = map.get(u);
            for (int v : children) {
                indgree[v]--;
                if (indgree[v] == 0) {
                    queue.offer(v);
                }
            }
        }
        if (ans.size() == n) {
            for (int i = 0; i < ans.size() - 1; i++) {
                System.out.print(ans.get(i) + " ");
            }
            System.out.println(ans.get(ans.size() - 1));
        } else {
            System.out.println(-1);
        }
    }





}
